<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>计次卡可充值列表</title>
<meta name="decorator" content="default" />
<style type="text/css">
</style>
<script type="text/javascript">
	$(document).ready(function() {
		$("body").height($('#right', parent.document).height());
		$("#inputForm").validate({
			submitHandler : function(form) {
				loading('正在提交，请稍等...');
				form.submit();
			},
			errorContainer : "#messageBox",
			errorPlacement : function(error, element) {
				$("#messageBox").text("输入有误，请先更正。");
				if (element.is(":checkbox") || element.is(":radio")) {
					error.appendTo(element.parent().parent());
				} else {
					error.insertAfter(element);
				}
			},
			messages : {
				email : "格式有误！"
			}
		});
		disableExitMenu();
	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</head>
<body>
	<div data-role="navbar">
		<ul>
			<li><a href="${ctx}/cash/member/recharge/cardtimes">计次护理卡充值</a></li>
			<li><a href="${ctx}/cash/member/recharge/cardduration"
				class="ui-btn-active">时段护理卡充值</a></li>
			<li><a href="${ctx}/cash/member/recharge/cardproduct">产品充值卡充值</a></li>
			<li><a href="${ctx}/cash/member/recharge/cardall">综合充值卡充值</a></li>
		</ul>
	</div>
		<br/>
	<div class="container">
		<tags:message content="${message}" />
	<div class="icon-buttons">
			<input type="button" data-inline="true" data-icon="back"
				onclick="return directOpenURL('${ctx}/cash/member/detail?id=${member.customer.id}')"
				data-iconpos="notext" value=" 返回" />
		</div>
		<form:form id="searchForm" modelAttribute=""
			action="${ctx}/cash/member/detail" method="post">
			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
			<input id="pageSize" name="pageSize" type="hidden"
				value="${page.pageSize}" />
		</form:form>
		<table id="contentTable" data-role="table" class="ui-responsive table-stroke">
			<thead>
				<tr>
					<th colspan="10" style="text-align:center;">计次护理卡</th>
				</tr>
				<tr>
					<th>卡名</th>
					<th>护理项目</th>
					<th>护理间隔</th>
					<th>护理时段</th>
					<th>开卡时间</th>
					<th>结束时间</th>
					<th>零售价</th>
					<th>店面优惠价</th>
					<th>当前状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${member.rechargeEleMgr.durationCards}"
					var="element">
					<tr id="${element.uuid}">
						<td>${element.cardDetail.name}</td>
						<td>${element.cardDetail.careName}</td>
						<td>${element.cardDetail.careDuration} 天</td>
						<td>${element.cardDetail.duration} 个月</td>
						<td>${fns:formatDate(element.cardDetail.beginDate,
							"yyyy-MM-dd HH:mm:ss")}</td>
						<td>${fns:formatDate(element.cardDetail.endDate, "yyyy-MM-dd
							HH:mm:ss")}</td>
						<td>${element.cardDetail.retailPrice}</td>
						<td>${element.cardDetail.price}</td>
						<td>${element.cardDetail.state}</td>
						<td><a data-role="button" class="single-return-button"
							href="${ctx}/cash/member/recharge/cardduration/form?card=${element.uuid}">充值</a>
						</td>
					</tr>
				</c:forEach>

			</tbody>
		</table>
		<div class="pagination">${page}</div>
	</div>
</body>
</html>
